<?php
include 'component/rss/RSS.php';
$rss = new RSS($site->SITENAME." - ".$pages->title, $site->SITE_URL,$pages->text, "Copyright ".@date("Y")." c ");
$rss->image ["url"]= $HOME_URL."resources/".$cquery->getResourceDetails($site->SITELOGO);
$rss->image ["title"]= $site->SITENAME." logo";
$items  = array( );
// put your code here

$spages= $pages->getsubPage();

if(count($spages)>0) {
    for($i=0;$i<count($spages);$i++) {
        $url =$site->SITE_URL.$spages[$i]->getURL() ;
        $items[$i] =  new RSSItem($spages[$i]->category, $spages[$i]->summary, $url,$spages[$i]->fulldate." GMT");
  //  echo $spages[$i]->fulldate." <br  />";

    }
}
$rss->rssItems = $items;
$rss->buildRSS();
?>